<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>超市收银系统</title>
    <link type="text/css" rel="stylesheet" href="fontsawesome/css/font-awesome.css"/>
    <style type="text/css">
        .providerAdd{
            line-height: 50px;
            width: 99%;
            border: 1px solid #e0f0fd;
            margin: 0 5px;
            background-color: rgba(32, 163, 255, 0.18);
        }
        #upForm {
            line-height: 50px;
            width: 40%;
            height: 80%;
            margin:80px auto;
            background-color: rgba(32, 163, 255, 0.18);

        }
        .update {
            width: 80%;
            line-height: 45px;
            margin: 20px 32%;
            font-size: 22px;
            font-weight: bold;
        }
        .first {
            padding-top: 10%;
        }
        .update input {
            display: inline;
        }
        .update select {
            display: inline;
        }
        .providerAddBtn {
            margin-top: 40px;

        }
        .providerAddBtn input[type="button"]{
            width: 8%;

            font-size: 25px;
            background-color: rgba(10, 94, 182, 0.42);
        }
        .providerAddBtn input[value="保存"]{
            position:absolute;
            margin: 0;
            right:51%;
        }
        .providerAddBtn input[value="返回"]{
            position:absolute;
            margin: 0;
            right:41%;
        }
    </style>
</head>
<body>

<div class="providerAdd">
    <form id="upForm" name="userForm" method="post" action="jsp/emp.do">

        <div class="update">
            <span>客户姓名：</span>
            <input type="text" name="userName" id="userName" th:value="${conInfo?.userName}">
        </div>

        <div class="update">
            <span>客户性别：</span>

            <select name="sex" id="sex">
                <option value="1" th:selected="${conInfo?.sex == 1}">男</option>
                <option value="0" th:selected="${conInfo?.sex == 0}">女</option>
            </select>

        </div>

        <div class="update">
            <span>客户电话：</span>
            <input  type="text" name="phone" id="phone"  th:value="${conInfo?.phone}">
        </div>
        <div class="update">
            <span>客户住址：</span>
            <input  type="text" name="salary" id="address"  th:value="${conInfo?.address}">
        </div>

        <div class="providerAddBtn">
            <input type="button" name="add"  value="保存" >
            <input type="button" name="back" value="返回" >
        </div>
    </form>
</div>
</body>

<script src="/js/jquery-2.2.1.min.js"></script>
<script src="/js/jump.js"></script>
<script type="text/javascript" th:inline="javascript">
    $(".providerAddBtn :button[value='保存']").bind("click", function() {
        if(!confirm("确定保存吗?")) return;
        location = "/con/modify?"+$("#upForm").serialize()+"&id="+conInfo.id
    });
    /* $(".providerAddBtn :button[value='返回']").bind("click", function() {
         toJump([[${#session.getAttribute("prevUrl")}]], [[${#session.getAttribute("prevParam")}]]);
     });*/
    $(".providerAddBtn :button[value='返回']").bind("click", function() {
        location = "/con/query?"
    });
</script>
</html>